<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="ie=edge,chrome=1">
    <meta name="author" content="姚德秋">
    <title></title>
    <style>
        .box {
            width: 1220px;
            height: 480px;
            margin: 0 auto;
            position: relative;
        }

        ul {
            margin: 0;
            padding: 0;
            list-style: none;
        }

        li {
            position: absolute;
            top: 0;
            left: 0;
            display: none;
        }

       .current {
            display: block;
        }

        .yuan {
            /* width: 200px; */
            position: absolute;
            left: 500px;
            bottom: 90px;
            /* margin: 0 auto; */
        }

        .yuan div {
            width: 20px;
            height: 20px;
            border-radius: 100%;
            background-color: white;
            display: inline-block;
            margin-left: 10px;
            
              /* display: none;  */
        }
        .bai{
            background-color: red;
             /* display: block; */
        }
    </style>
</head>

<body>
    <div class="box">
        <ul>
            <li class="current"><a href="#"><img src="sougouimg/1.jpg" alt=""></a></li>
            <li><a href="#"><img src="sougouimg/2.jpg" alt=""></a></li>
            <li><a href="#"><img src="sougouimg/3.jpg" alt=""></a></li>
            <li><a href="#"><img src="sougouimg/4.jpg" alt=""></a></li>
            <li><a href="#"><img src="sougouimg/5.jpg" alt=""></a></li>
        </ul>
        <div class="yuan">
            <div class="bai"></div>
            <div></div>
            <div></div>
            <div></div>
            <div></div>
        </div>
    </div>


</body>

</html>
<script>
   var lis = document.querySelectorAll('li');
    var divs = document.querySelectorAll('.yuan div');
    var index = 0;
    setInterval(changeImage, 1000);
    function changeImage() {
        for (var i = 0; i < lis.length; i++) {
            lis[i].className = '';
            divs[i].className = '';
        }
        index++;
        if (index == 5) {
            index= 0;
        }
        lis[index].className = 'current';
        divs[index].className = 'bai';
    }
    
    for (var j = 0; j < divs.length; j++) {
        divs[j].index = j;
        divs[j].onmouseover = function () {
            clearInterval(changeImage);
            lis[this.index].className = 'current';
            divs[this.index].className = 'bai';
        }
        divs[j].onmouseout = function(){
            setInterval(changeImage, 1000);
        }
    }

</script>